]> git.saurik.com Git - apple/security.git/blobdiff - OSX/Keychain Circle Notification/KNPersistentState.m
Security-58286.200.222.tar.gz
[apple/security.git] / OSX / Keychain Circle Notification / KNPersistentState.m
index 458ff973b4fc3f954aadc1f3b75deca3a462a06d..a5499fd060819a17fa1dcf65a95724ed677f86e0 100644 (file)
@@ -23,6 +23,7 @@
 
 
 #import "KNPersistentState.h"
+#import <utilities/debugging.h>
 
 @implementation KNPersistentState
 
     NSError *error = nil;
     NSData *stateData = [NSData dataWithContentsOfURL:[state urlForStorage] options:0 error:&error];
     if (!stateData) {
-        NSLog(@"Can't read state data (p=%@, err=%@)", [state urlForStorage], error);
+        secdebug("kcn", "Can't read state data (p=%@, err=%@)", [state urlForStorage], error);
     } else {
         NSPropertyListFormat format;
         plist = [NSPropertyListSerialization propertyListWithData:stateData options: NSPropertyListMutableContainersAndLeaves format:&format error:&error];
         
         if (plist == nil) {
-            NSLog(@"Can't deserialize %@, e=%@", stateData, error);
+            secdebug("kcn", "Can't deserialize %@, e=%@", stateData, error);
         }
     }
     
                                                                   } mutableCopy];
        if (self.debugLeftReason)
                plist[@"debugLeftReason"] = self.debugLeftReason;
-    NSLog(@"writeToStorage plist=%@", plist);
+    secdebug("kcn", "writeToStorage plist=%@", plist);
        
     NSError *error = nil;
     NSData *stateData = [NSPropertyListSerialization dataWithPropertyList:plist format:NSPropertyListXMLFormat_v1_0 options:kCFPropertyListImmutable error:&error];
     if (!stateData) {
-        NSLog(@"Can't serialize %@: %@", plist, error);
+        secdebug("kcn", "Can't serialize %@: %@", plist, error);
         return;
     }
     if (![stateData writeToURL:[self urlForStorage] options:NSDataWritingAtomic error:&error]) {
-        NSLog(@"Can't write to %@, error=%@", [self urlForStorage], error);
+        secdebug("kcn", "Can't write to %@, error=%@", [self urlForStorage], error);
     }
 }